<?php

final class ObjectAccessRule {
    protected $owners = array();

    const ALL = 1;
    const NONE = 2;

    public function read($member, $rule)
    {
        $trace = debug_backtrace();
        $owner = $trace['class'];
        $this->owners[$owner][$member]['read'] = ObjectAccessRule::ALL;
    }

    public function write()
    {
    }
}

class A {
    public function asd()
    {
        $o = new ObjectAccessRule();
    }
}

echo "<pre>";
$a = new A();

$a->asd();